FIX: Input Actions editor window throws a "Failed to load asset" exception on startup when its layout is restored in a different project [UUM-144318] - #2465
Merged
Pauliusd01 merged 3 commits intoAug 5, 2026
Conversation
…ption on startup when its layout is restored in a different project [UUM-144318] The Input Actions editor window persisted its target asset's GUID in the editor window layout, which is shared across projects, so a restore in a project where that GUID resolved to no asset logged an exception on startup. In InputActionsEditorWindow.CreateGUI(), the layout-restore branch loaded the asset from the persisted GUID and threw an Exception when the load returned null, which the surrounding catch surfaced via Debug.LogException before closing the window. The asset == null branch now closes the window quietly instead of throwing. The close is deferred via EditorApplication.delayCall because CreateGUI runs inside the UITK repaint; closing synchronously there tears down the window's panel mid-repaint and produces a follow-up NullReferenceException. No working copy exists to clean up at that point. Jira: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144318
Pauliusd01
marked this pull request as ready for review
August 5, 2026 10:12
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop #2465 +/- ##
===========================================
- Coverage 78.95% 78.95% -0.01%
===========================================
Files 767 767
Lines 140780 140807 +27
===========================================
+ Hits 111153 111172 +19
- Misses 29627 29635 +8 Flags with carried forward coverage won't be shown. Click here to find out more.
|
MorganHoarau
approved these changes
Aug 5, 2026
MorganHoarau
left a comment
Collaborator
There was a problem hiding this comment.
Safe and simple. Comment is a bit verbose. Discussed on slack.
…utactionseditorwindow-restore # Conflicts: # Packages/com.unity.inputsystem/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Note
This pull request was generated automatically. Please review carefully before merging.
InputActionsEditorWindow.CreateGUI()persists its target asset's GUID (m_AssetGUID) in the editor window layout, which is shared across projects. When the window's layout is restored in a project where that GUID resolves to no asset, the restore branch loads a null asset and throws, and the surroundingcatchsurfaces it viaDebug.LogExceptionon editor startup.The
asset == nullbranch now closes the window quietly instead of throwing. The close is scheduled throughEditorApplication.delayCallrather than called inline:CreateGUI()runs inside the UIToolkit repaint, and closing the window synchronously there tears down its panel mid-repaint, which then produces a follow-upNullReferenceExceptionin the render tree. Deferring the close letsCreateGUI()return cleanly and the window closes on the next editor tick.Testing status & QA
InputTestFixture/ edit-mode tests cannot reproduce.Overall Product Risks
Comments to reviewers
The window shows an empty panel for a single editor tick before
delayCallcloses it; this is expected given the close is deferred out of the repaint. The siblingcatchblock a few lines below still callsClose()synchronously for genuinely unexpected restore exceptions and has the same latent teardown risk, but it was left unchanged to keep this fix scoped to the reported scenario.Note: if fixing it this way is undesirable then maybe changing the type of the message from error to a warning would be enough?
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.